package com.manage.project.biz.service.impl;

import java.util.List;
import com.manage.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.manage.project.biz.mapper.BizJidiansheshiguzhangxunchaMapper;
import com.manage.project.biz.domain.BizJidiansheshiguzhangxuncha;
import com.manage.project.biz.service.IBizJidiansheshiguzhangxunchaService;

/**
 Service业务层处理
 *
 * @author liang
 *
 */
@Service
public class BizJidiansheshiguzhangxunchaServiceImpl implements IBizJidiansheshiguzhangxunchaService
{
    @Autowired
    private BizJidiansheshiguzhangxunchaMapper bizJidiansheshiguzhangxunchaMapper;

    /**
     * 查询故障巡查
     *
     * @param id 故障巡查主键
     * @return 故障巡查
     */
    @Override
    public BizJidiansheshiguzhangxuncha selectBizJidiansheshiguzhangxunchaById(Long id)
    {
        return bizJidiansheshiguzhangxunchaMapper.selectBizJidiansheshiguzhangxunchaById(id);
    }

    @Override
    public BizJidiansheshiguzhangxuncha selectBizJidiansheshiguzhangxunchaByshebeiId(String id) {
        return bizJidiansheshiguzhangxunchaMapper.selectBizJidiansheshiguzhangxunchaByshebeiId(id);
    }

    /**
     * 查询故障巡查列表
     *
     * @param bizJidiansheshiguzhangxuncha 故障巡查
     * @return 故障巡查
     */
    @Override
    public List<BizJidiansheshiguzhangxuncha> selectBizJidiansheshiguzhangxunchaList(BizJidiansheshiguzhangxuncha bizJidiansheshiguzhangxuncha)
    {
        return bizJidiansheshiguzhangxunchaMapper.selectBizJidiansheshiguzhangxunchaList(bizJidiansheshiguzhangxuncha);
    }

    /**
     * 新增故障巡查
     *
     * @param bizJidiansheshiguzhangxuncha 故障巡查
     * @return 结果
     */
    @Override
    public int insertBizJidiansheshiguzhangxuncha(BizJidiansheshiguzhangxuncha bizJidiansheshiguzhangxuncha)
    {
        bizJidiansheshiguzhangxuncha.setCreateTime(DateUtils.getNowDate());
        return bizJidiansheshiguzhangxunchaMapper.insertBizJidiansheshiguzhangxuncha(bizJidiansheshiguzhangxuncha);
    }

    /**
     * 修改故障巡查
     *
     * @param bizJidiansheshiguzhangxuncha 故障巡查
     * @return 结果
     */
    @Override
    public int updateBizJidiansheshiguzhangxuncha(BizJidiansheshiguzhangxuncha bizJidiansheshiguzhangxuncha)
    {
        bizJidiansheshiguzhangxuncha.setUpdateTime(DateUtils.getNowDate());
        return bizJidiansheshiguzhangxunchaMapper.updateBizJidiansheshiguzhangxuncha(bizJidiansheshiguzhangxuncha);
    }

    /**
     * 批量删除故障巡查
     *
     * @param ids 需要删除的故障巡查主键
     * @return 结果
     */
    @Override
    public int deleteBizJidiansheshiguzhangxunchaByIds(Long[] ids)
    {
        return bizJidiansheshiguzhangxunchaMapper.deleteBizJidiansheshiguzhangxunchaByIds(ids);
    }

    /**
     * 删除故障巡查信息
     *
     * @param id 故障巡查主键
     * @return 结果
     */
    @Override
    public int deleteBizJidiansheshiguzhangxunchaById(Long id)
    {
        return bizJidiansheshiguzhangxunchaMapper.deleteBizJidiansheshiguzhangxunchaById(id);
    }
}
